/**
 * 
 * If you have edited the file, please update
 * all the last-modified fields manually. Thanks!
 *
 * @last-modified by: 
 * @last-modified date: 
 * @last-modified time: 
 *
 * @author Swee Zhi
 * @date-created Sep 12, 2011    @time-created 6:57:41 PM
 *
 * @project: 
 * @module: 
 * @institution: 
 *
 */
package util.enumhelper;

import util.enumeration.FnbType;
import util.enumeration.Language;

public class LocalizedFnbType {

    // alphabetical order
    public static String getLocalizedFnbTypeAsString(FnbType fnbType, String locale) {
        String localizedFnbType = "";
        
        // en_US ENGLISH, UNITED STATES
        if (locale.equals(SupportedLocale.getSupportedLocale(Language.ENGLISH_US))) {
            localizedFnbType = getFnbType_EN_US(fnbType);
        }
        // en_SG ENGLISH, SINGAPORE
        else
        if (locale.equals(SupportedLocale.getSupportedLocale(Language.ENGLISH_SINGAPORE))) {
            localizedFnbType = getFnbType_EN_SG(fnbType);
        }
        // ms_MY MALAY, MALAYSIA
        else
        if (locale.equals(SupportedLocale.getSupportedLocale(Language.MALAY))) {
            localizedFnbType = getFnbType_MS_MY(fnbType);
        }
        
        // zh_CN CHINESE, CHINA
        else
        if (locale.equals(SupportedLocale.getSupportedLocale(Language.CHINESE_CHINA))) {
            localizedFnbType = getFnbType_ZH_CN(fnbType);
        }
        // other language...
        else {
            localizedFnbType = getFnbType_EN_US(fnbType);
        }
        
        return localizedFnbType;
    }
    
    // simplified chinese (zh_CN)
    private static String getFnbType_ZH_CN(FnbType fnbType) {
        String localizedFnbType = "";
        
        switch (fnbType) {
            case BISTRO: localizedFnbType = "小酒馆" ; break;
            case BUFFET: localizedFnbType = "自助餐"; break;
            case CAFE: localizedFnbType = "咖啡厅"; break;
            case CAFETERIA: localizedFnbType = "食堂"; break;
            case COFFEE_HOUSE: localizedFnbType = "咖啡馆"; break;
            case COFFEE_SHOP: localizedFnbType = "咖啡店"; break;
            case CASUAL_DINING: localizedFnbType = "休闲餐饮式"; break;
            case FAMILY_STYLE: localizedFnbType = "家庭式"; break;
            case FAST_CASUAL: localizedFnbType = "快速休闲式"; break;
            case FAST_FOOD: localizedFnbType = "快餐"; break;
            case FINE_DINING: localizedFnbType = "精致餐饮式"; break;
            case FOOD_COURT: localizedFnbType = "美食广场"; break;
            case HAWKER_CENTRE: localizedFnbType = "小贩中心"; break;
            case PUB: localizedFnbType = "酒吧"; break;
            case TEA_HOUSE: localizedFnbType = "茶馆"; break;
        }
        return localizedFnbType;
    }
    
    // default (en_US)
    private static String getFnbType_EN_US(FnbType fnbType) {
        String localizedFnbType = "";
        
        switch (fnbType) {
            case BISTRO: localizedFnbType = "Bistro" ; break;
            case BUFFET: localizedFnbType = "Buffet"; break;
            case CAFE: localizedFnbType = "Cafe"; break;
            case CAFETERIA: localizedFnbType = "Cafeteria"; break;
            case COFFEE_HOUSE: localizedFnbType = "Coffee House"; break;
            case COFFEE_SHOP: localizedFnbType = "Coffee Shop"; break;
            case CASUAL_DINING: localizedFnbType = "Casual Dining"; break;
            case FAMILY_STYLE: localizedFnbType = "Family Style"; break;
            case FAST_CASUAL: localizedFnbType = "Fast Casual"; break;
            case FAST_FOOD: localizedFnbType = "Fast Food"; break;
            case FINE_DINING: localizedFnbType = "Fine Dining"; break;
            case FOOD_COURT: localizedFnbType = "Food Court"; break;
            case HAWKER_CENTRE: localizedFnbType = "Hawker Centre"; break;
            case PUB: localizedFnbType = "Pub"; break;
            case TEA_HOUSE: localizedFnbType = "Tea House"; break;
        }
        return localizedFnbType;
    }
    
    // singapore english (en_SG)
    private static String getFnbType_EN_SG(FnbType fnbType) {
        String localizedFnbType = "";
        
        switch (fnbType) {
            case BISTRO: localizedFnbType = "Bistro" ; break;
            case BUFFET: localizedFnbType = "Buffet"; break;
            case CAFE: localizedFnbType = "Cafe"; break;
            case CAFETERIA: localizedFnbType = "Cafeteria"; break;
            case COFFEE_HOUSE: localizedFnbType = "Coffee House"; break;
            case COFFEE_SHOP: localizedFnbType = "Coffee Shop"; break;
            case CASUAL_DINING: localizedFnbType = "Casual Dining"; break;
            case FAMILY_STYLE: localizedFnbType = "Family Style"; break;
            case FAST_CASUAL: localizedFnbType = "Fast Casual"; break;
            case FAST_FOOD: localizedFnbType = "Fast Food"; break;
            case FINE_DINING: localizedFnbType = "Fine Dining"; break;
            case FOOD_COURT: localizedFnbType = "Food Court"; break;
            case HAWKER_CENTRE: localizedFnbType = "Hawker Centre"; break;
            case PUB: localizedFnbType = "Pub"; break;
            case TEA_HOUSE: localizedFnbType = "Tea House"; break;
        }
        return localizedFnbType;
    }
    
    // bahasa malaysia (ms_MY)
    private static String getFnbType_MS_MY(FnbType fnbType) {
        String localizedFnbType = "";
        
        switch (fnbType) {
            case BISTRO: localizedFnbType = "Bistro" ; break;
            case BUFFET: localizedFnbType = "Bufet"; break;
            case CAFE: localizedFnbType = "Cafe"; break;
            case CAFETERIA: localizedFnbType = "Cafeteria"; break;
            case COFFEE_HOUSE: localizedFnbType = "Rumah Coffee"; break;
            case COFFEE_SHOP: localizedFnbType = "Kedai Kopi"; break;
            case CASUAL_DINING: localizedFnbType = "Santapan Gaya Kasual"; break;
            case FAMILY_STYLE: localizedFnbType = "Gaya Keluarga"; break;
            case FAST_CASUAL: localizedFnbType = "Fast Kasual"; break;
            case FAST_FOOD: localizedFnbType = "Makanan Segera"; break;
            case FINE_DINING: localizedFnbType = "Santapan"; break;
            case FOOD_COURT: localizedFnbType = "Mahkamah Makanan"; break;
            case HAWKER_CENTRE: localizedFnbType = "Penjaja Pusat"; break;
            case PUB: localizedFnbType = "Pub"; break;
            case TEA_HOUSE: localizedFnbType = "Rumah Teh"; break;
        }
        return localizedFnbType;
    }
    
    // new fnbType for localized language template (copy and paste to use)
//    private static String getFnbType_XX_YY(FnbType fnbType) {
//        String localizedFnbType = "";
//        
//        switch (fnbType) {
//            case CHINESE: localizedFnbType = "" ; break;
//            case CANTONESE: localizedFnbType = ""; break;
//            case HAINANESE: localizedFnbType = ""; break;
//            case HAKKA: localizedFnbType = ""; break;
//            case HOKKIEN: localizedFnbType = ""; break;
//            case FUJIAN: localizedFnbType = ""; break;
//            case SHANGHAI: localizedFnbType = ""; break;
//            case TEOCHEW: localizedFnbType = ""; break;
//            case XINJIANG: localizedFnbType = ""; break;
//            case MALAY: localizedFnbType = ""; break;
//            case INDIAN: localizedFnbType = ""; break;
//            case WESTERN: localizedFnbType = ""; break;
//            case JAPANESE: localizedFnbType = ""; break;
//            case KOREAN: localizedFnbType = ""; break;
//        }
//        return localizedFnbType;
//    }
}
